#pragma once

#include <QGraphicsView>
#include "ModelScene.h"

class ModelView : public QGraphicsView
{
    Q_OBJECT
public:
    ModelView(ModelScene* scene, QWidget* parent = nullptr);
    ~ModelView();
    ModelScene* modelScene() { return m_scene; }

protected:
    void dragEnterEvent(QDragEnterEvent* event);

    void dragMoveEvent(QDragMoveEvent* event);

    void dropEvent(QDropEvent* event);

    void scrollContentsBy(int dx, int dy);

signals:
    void scrollChanged();

private:
    ModelScene* m_scene;

};
